﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace GuiMenyTest
{


    public partial class Main : Form
    {
        private IntegerData _id = new IntegerData();
        private Skriv skriv = new Skriv();
        private Läs läs;

        public Main()
        {
            läs = new Läs(_id);
            InitializeComponent();
        }

        private void avslutaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void skrivToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if(_id.Init)
                MessageBox.Show(_id.ToString(), "Heltalsdata");
            else
                MessageBox.Show("Ingen data har lagrats ännu!");
        }

        private void läsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            läs.ShowDialog();
        }
    }
}
